package cn.yitun.chat.yitunservernetcore.server.general.main.business.system.action;

import cn.yitun.chat.yituncommonmessage.Info;
import cn.yitun.chat.yituncommonmessage.client.ClientHead;
import cn.yitun.chat.yitungeneral.annotation.action.ActionMapping;
import cn.yitun.chat.yitungeneral.annotation.action.MethodMapping;
import cn.yitun.chat.yitungeneral.annotation.parameter.ParamDefine;
import cn.yitun.chat.yitunnetsession.session.SocketSession;
import cn.yitun.chat.yitunservernetcore.server.general.main.business.system.service.AuthService;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * 
 * Date 2019-01-20 19:12:16<br>
 * Description 系统相关
 * 
 * @author yitun
 * @since 1.0.0
 */
@Component
@ActionMapping(value = "1.0.001")
public class SystemAuthAction {

	@Resource
	AuthService authService;

	@MethodMapping(value = "", isIntercept = false)
	@ActionMapping(value = "1.1.0001")
	public Object auth(
			SocketSession socketSession,
			ClientHead clientHead) {
		Info info = authService.auth(socketSession, clientHead, clientHead.getToken());
		return info;
	}
}
